package com.tuanzi.loan.business.repository.product.product.custom;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.tuanzi.loan.business.entity.product.product.LoanProductInfo;
import com.tuanzi.loan.vo.request.product.product.LoanProductInfoSearchRequest;
import com.tuanzi.loan.vo.response.product.product.LoanProductInfoSearchResponse;

/**
 * @author Ray 2017/09/21
 */

public interface LoanProductInfoRepositoryCustom {

	Page<LoanProductInfoSearchResponse> list(LoanProductInfoSearchRequest searchRequest, Pageable pageable);

	List<LoanProductInfoSearchResponse> listAllUnionProductInfo();

	/**
	 * 只查找id和产品名称，做下拉列表
	 * 
	 * @return
	 */
	List<LoanProductInfo> listAllProductInfo();

	/**
	 * 只查找id和产品名称，做下拉列表
	 * 
	 * @return
	 */
	List<LoanProductInfo> listAllProductInfoByCompanyId(Long companyId);

	void deleteBy(Long prdId);

	List<Long> getTopicIdBy(Long prdId);

	List<Long> getAdvertIdBy(Long prdId);

	Long countOnline(LoanProductInfoSearchRequest searchRequest);

	Long countAutoOnline(LoanProductInfoSearchRequest searchRequest);

	Long sumDailyClickUvLimitationByOnline(LoanProductInfoSearchRequest searchRequest);

	Long sumDailyClickUvLimitation(LoanProductInfoSearchRequest searchRequest);

	Long sumDailyClickUvRemainingByOnelin(LoanProductInfoSearchRequest searchRequest);

	Long sumDailyClickUvLimitationByOnlineOrAutoOnline();

	Long sumDailyClickUvRemainingByOnelinOrAutoOnline();

	void updateLoanProductInfo(LoanProductInfo loanProductInfo);
}
